package com.defect.service.statisticsService.statisticsServiceImpl;

import com.defect.mapper.StateMapper;
import com.defect.po.State;
import com.defect.service.statisticsService.SStateService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class SStateServiceImpl implements SStateService {
    @Resource
    private StateMapper stateMapper;

    /**
     * 带条件查询每种缺陷状态的数量
     * @param id 项目id
     * @param date1 开始时间
     * @param date2 最后时间
     * @return 返回实体类集合，属性count1：缺陷状态的数量，属性severityDesc：缺陷状态描述
     * @throws Exception
     */
    @Override
    public List<State> selectStateCount(int id, Date date1, Date date2) throws Exception {
        return stateMapper.selectStateCount(id,date1,date2);
    }
}
